package com.csc.banking.model;

// Generated Jul 11, 2014 10:43:16 PM by Hibernate Tools 3.4.0.CR1

import java.util.HashSet;
import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;

import static javax.persistence.GenerationType.IDENTITY;

import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * Transactiontypes generated by hbm2java
 */
@Entity
@Table(name = "TransactionTypes", catalog = "mydb")
public class TransactionType implements EntityObject, java.io.Serializable
{

	private Long transactionTypeId;
	private String transactionType;
	private Set<TransactionAction> transactionActions = new HashSet<TransactionAction>(0);
	private static final long serialVersionUID = 1L;

	public TransactionType() 
	{
	}

	public TransactionType(String transactionType) 
	{
		this.transactionType = transactionType;
	}

	public TransactionType(String transactionType,
			Set<TransactionAction> transactionActionses) 
	{
		this.transactionType = transactionType;
		this.transactionActions = transactionActionses;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "TransactionTypeId", unique = true, nullable = false)
	public Long getTransactionTypeId() 
	{
		return this.transactionTypeId;
	}

	public void setTransactionTypeId(Long transactionTypeId) 
	{
		this.transactionTypeId = transactionTypeId;
	}

	@Column(name = "TransactionType", unique = true, nullable = false, length = 45)
	public String getTransactionType() 
	{
		return this.transactionType;
	}

	public void setTransactionType(String transactionType) 
	{
		this.transactionType = transactionType;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "transactionType")
	public Set<TransactionAction> getTransactionActions() 
	{
		return this.transactionActions;
	}

	public void setTransactionActions(
			Set<TransactionAction> transactionActions) 
	{
		this.transactionActions = transactionActions;
	}

}
